<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<div style="display: none"><script id="myEditorImageI" type="text/plain"></script></div> 
<div class="pageContent">
	<form method="post" action="${rootUrl}/goods/goods-image<c:if test="${goodsImage.id != 0 && goodsImage.id != ''}">/${goodsImage.id}</c:if>" class="pageForm required-validate" onsubmit="return validateCallback(this, editDialogAjaxDone);">
		<c:if test="${goodsImage.id != 0 && goodsImage.id != '' }"><input type="hidden" name="_method" value="put"></c:if>
		<div class="pageFormContent" layoutH="56">
		<%-- <input type="hidden" name="goodsClassParentId" value="${goodsClassParentId }"> --%>
			<input type="hidden" name="goodsImage.id" value="${goodsImage.id }">
			<input type="hidden" name="goodsImage.goods.id" value="${goodsImage.goods.id }">
			<input type="hidden" name="goodsImage.goodsSpecValue.id" value="${goodsImage.goodsSpecValue.id }">
			<p>
				<label>序号：</label>
				<input name="goodsImage.sort" type="text" size="30" value="${goodsImage.sort }"/><br>
			</p>
			<p>
				<label>是否默认：</label>
				<select  name="goodsImage.isDefault">
				<option <c:if test="${goodsImage.isDefault == 0}">selected="selected"</c:if> value="0">否</option>
				<option <c:if test="${goodsImage.isDefault == 1}">selected="selected"</c:if> value="1">是</option>
				</select>
			</p>

	        <dl class="nowrap">
				<dt>商品图片：</dt>
				<dd style="width: 300px;">
				<input name="goodsImage.imgurl" id="gi" type="hidden" size="30" value="${goodsImage.imgurl }"/>
				<div class="imgContainer" >
				<a href="#" onclick="iFileUploader.upImg('gi','myEditorImagegi');">
				<img id="myEditorImagegi" src="${goodsImage.imgurl}" /></a></div>
				</dd>
			</dl> 
		</div>	
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>

<script>
var uploadFolder = 1;
iFileUploader.initImg("myEditorImageI","gi","myEditorImagegi",{imageFolder:uploadFolder});
</script>